package model01;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

public class FileReaderEx {
	public static void main(String[] args) {
		try {
			FileReader fr = new FileReader("fw1.txt");
			BufferedReader br = new BufferedReader(fr);
			
			String s;
			try {
				System.out.println("Chuoi doc tu file: ");
				//trong khi con noi dung de doc
				while((s = br.readLine()) != null) {
					System.out.print(s);
				}
				
				fr.close();
				
			} catch (IOException e) {
				e.printStackTrace();
			}
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}
	}

}
